package com.pine.common.beans.pineframework.request;

import cn.hutool.core.util.DesensitizedUtil;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.pine.common.beans.request.DataRequest;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;

/**
 * <p>
 * 系统解密并脱敏请求体
 * </p>
 *
 * @author pine manage
 * @since 2024-10-09
 */
@EqualsAndHashCode(callSuper = true)
@Schema(title = "SysDecryptAndDesensitizeRequest", description = "系统解密并脱敏请求体")
@Data
public class SysDecryptAndDesensitizeRequest extends DataRequest<String> {
    @Serial
    private static final long serialVersionUID = -5320069766055133920L;

    @JsonProperty("desensitizedType")
    @NotNull(message = "脱敏类型不能为空")
    @Schema(title = "desensitizedType", description = "脱敏类型", requiredMode = Schema.RequiredMode.REQUIRED,
            allowableValues = {"ID_CARD", "MOBILE_PHONE", "ADDRESS", "EMAIL"})
    private DesensitizedUtil.DesensitizedType desensitizedType;
}
